<template>
	<view class="bazi_info" v-if="data!=null">

		<view class="base_info">

			<view class="show">
				<text class="l">缘主姓名:</text>
				<text class="r">{{data.base_info.name}}</text>
			</view>
			<view class="show">
				<text class="l">出生公历:</text>
				<text class="r">{{data.base_info.gongli}}</text>
			</view>
			<view class="show">
				<text class="l">八字格局:</text>
				<text class="r">{{data.base_info.zhengge}}</text>
			</view>
			<view class="show">
				<text class="l">星宿信息:</text>
				<text class="r">{{data.base_info.xingxiu}}</text>
			</view>

			<view class="show">
				<text class="l">命卦信息:</text>
				<text class="r">{{data.base_info.minggua.minggua_name}}卦（{{data.base_info.minggua.minggua_fangwei}}）</text>
			</view>
			<view class="show">
				<text class="l">生肖星座:</text>
				<text class="r">{{data.base_info.wuxing_wangdu}}</text>
			</view>
			<view class="show">
				<text class="l">五行喜忌:</text>
				<text class="r">{{data.base_info.wuxing_xiji}}</text>
			</view>
			<view class="show">
				<text class="l">生肖星座:</text>
				<text class="r">{{data.base_info.shengxiao}}</text>
			</view>
			<view class="show">
				<text class="l">起运信息:</text>
				<text class="r">{{data.base_info.qiyun}}</text>
			</view>
			<view class="show">
				<text class="l">交运信息:</text>
				<text class="r">{{data.base_info.jiaoyun}}</text>
			</view>
			<view class="show">
				<text class="l">盲派交运:</text>
				<text class="r">{{data.base_info.jiaoyun_mang}}</text>
			</view>
			<view class="show">
				<text class="l">天干留意:</text>
				<text class="r">{{data.base_info.tiangan_liuyi}}</text>
			</view>
			<view class="show">
				<text class="l">地支留意:</text>
				<text class="r">{{data.base_info.dizhi_liuyi}}</text>
			</view>
			<view class="show">
				<text class="l">胎元命身:</text>
				<text class="r">{{data.base_info.taiyuan}}</text>
			</view>

		</view>



		<view class="base_info">


			<view class="details">
				<view class="names">
					<text>喜用神分析：</text>

				</view>
				<view class="des">
					<text class="des_deta">日主天干为【{{data.base_info.xiyongshen.rizhu_tiangan}}】,
						同类为【{{data.base_info.xiyongshen.tonglei}}】, 异类为【{{data.base_info.xiyongshen.yilei}}】
						{{data.base_info.xiyongshen.qiangruo}}, 以【{{data.base_info.xiyongshen.xiyongshen}}】为喜用神
						五行统计：
						{{data.base_info.xiyongshen.jin_number}}金，{{data.base_info.xiyongshen.mu_number}}木，{{data.base_info.xiyongshen.huo_number}}水，{{data.base_info.xiyongshen.huo_number}}火，{{data.base_info.xiyongshen.tu_number}}土</text>
				</view>

			</view>

			<view class="details">
				<view class="names">
					<text>日柱论命：</text>

				</view>
				<view class="des">
					<text class="des_deta">{{data.detail_info.sizhu_info.sizhu_indication.xingge.rizhu}}</text>
				</view>

			</view>
			<view class="details">
				<view class="names">
					<text>财运分析：</text>

				</view>
				<view class="des">
					<text
						class="des_deta">{{data.detail_info.sizhu_info.sizhu_indication.caiyun.sanshishu_caiyun.detail_desc}}</text>
				</view>

			</view>
			<view class="details">
				<view class="names">
					<text>姻缘分析：</text>

				</view>
				<view class="des">
					<text
						class="des_deta">{{data.detail_info.sizhu_info.sizhu_indication.yinyuan.sanshishu_yinyuan}}</text>
				</view>

			</view>
			<view class="details">
				<view class="names">
					<text>称骨分析：</text>

				</view>
				<view class="des">
					<text class="des_deta">{{data.detail_info.sizhu_info.sizhu_indication.chenggu.description}}</text>
				</view>

			</view>
			<view class="details">
				<view class="names">
					<text>命运分析：</text>

				</view>
				<view class="des">
					<text
						class="des_deta">{{data.detail_info.sizhu_info.sizhu_indication.mingyun.sanshishu_mingyun}}</text>
				</view>

			</view>
			<view class="details">
				<view class="names">
					<text>五行分析：</text>

				</view>
				<view class="des">
					<text
						class="des_deta">{{data.detail_info.sizhu_info.sizhu_indication.wuxing.detail_desc}}。{{data.detail_info.sizhu_info.sizhu_indication.wuxing.detail_description}}。{{data.detail_info.sizhu_info.sizhu_indication.wuxing.simple_description}}</text>
				</view>

			</view>
			<view class="details">
				<view class="names">
					<text>十年大运：</text>
				
				</view>
				<view class="" v-for="(item,index) in data.detail_info.dayun_info">
					<view class="dayun">
						<span class="dayun_title">大运年{{item.dayun_start_year+'~'+item.dayun_end_year}}</span>
					</view>
					<view class="dayunone">
						<text class="ln">[大运年批事业]:</text> <text>{{item.dayun_indication.shiye}}</text>
					</view>
					<view class="dayunone">
						<text class="ln">[大运年批学业]:</text> <text>{{item.dayun_indication.xueye}}</text>
					</view>
					<view class="dayunone">
						<text class="ln">[大运年批运势]:</text> <text>{{item.dayun_indication.yunshi}}</text>
					</view>
					<view class="dayunone">
						<text class="ln">[大运年批姻缘]:</text> <text>{{item.dayun_indication.yinyuan}}</text>
					</view>
					<view class="dayunone">
						<text class="ln">[大运年批财运]:</text> <text>{{item.dayun_indication.caiyun}}</text>
					</view>
					<view class="dayunone">
						<text class="ln">[大运年批健康]:</text> <text>{{item.dayun_indication.jiankang}}</text>
					</view>
					<view class="liunian">
						<view class="" style="display: flex;align-items: center;justify-content: space-between;">
						
							<uni-collapse ref="collapse" v-model="value">
								<uni-collapse-item v-for="(itm,index1) in item.liunian_info" :key="index1" show-arrow>
										<template v-slot:title>
													<div style="color: blue;padding-left: 8px;height: 35px;line-height: 35px;">流年：{{itm.liunian_year}}</div>
												</template>
										<view class="content">
											   <view class="dayunone">
													<text class="ln">[流年批事业]:</text><text>{{itm.liunian_indication.shiye}}</text>
												</view>
												<view class="dayunone">
													<text class="ln">[流年批学业]:</text><text>{{itm.liunian_indication.xueye}}</text>
												</view>
												<view class="dayunone">
													<text class="ln">[流年批运势]:</text> <text>{{itm.liunian_indication.yunshi}}</text>
												</view>
												<view class="dayunone">
													<text class="ln">[流年批姻缘]:</text> <text>{{itm.liunian_indication.yinyuan}}</text>
												</view>
												<view class="dayunone">
													<text class="ln">[流年批财运]:</text> <text>{{itm.liunian_indication.caiyun}}</text>
												</view>
												<view class="dayunone">
													<text class="ln">[流年批健康]:</text> <text>{{itm.liunian_indication.jiankang}}</text>
												</view>
												
											
										</view>
								</uni-collapse-item>
								
							</uni-collapse>
						</view>
					</view>
					
				</view>
				
			</view>	


		</view>
		<view class="yl">
			<text>仅供娱乐！请勿当真</text>
		</view>

	</view>

</template>

<script>
	
	
	

	export default {
		
		data() {
			return {
				ff: {},
				data: null,
				value:""
			}
		},
		onLoad(options) {
			console.log(options)
			uni.showLoading({
				title:'测算中'
			})
			let params=JSON.parse(options.data)
			this.$api.jingsuan(params).then((res) => {
					
				if (res.errcode == 0) {
					this.data = res.data;
					setTimeout(() => {
						uni.hideLoading()
					}, 1000)
					
					
				} else {
					uni.showToast({
						title: res.errmsg,
						icon: 'none'
					})
				}
				
			})
		
			console.log(this.data)
			// console.log(this.data)
			// console.log(options.data)

		}
	}
</script>

<style lang="scss">
	.ln{
		font-weight: 800;
	}
	@mixin flex {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 8px;
		height: 45px;
	}

	@mixin tr1_w {
		width: 33px;
		text-align: center;

	}

	text {
		user-select: all;
	}

	.bazi_info {

		.base_info {
			margin: 20px;

			.title {
				display: flex;
				padding: 10rpx;

				.shu {

					width: 5px;
					height: 20px;
					background-color: #e6a84b;
					border-radius: $uni-border-radius-base;
				}

				.ti {
					padding-left: 15rpx;
					font-weight: 800;
					font-size: 30rpx;
				}
			}

			.show {
				margin-top: 15px;

				.l_ {
					font-size: 28rpx;
					display: inline-block;
					min-width: 50px;
					font-weight: 800;
				}

				.l {
					font-size: 30rpx;
					display: inline-block;
					min-width: 80px;
					font-weight: 800;

				}


			}

			.details {
				border: 1px solid #e5e5e5;
				border-bottom: none;
				margin-top: 20px;

				.names {
					text-align: center;
					color: #e6a84b;
					border-bottom: 1px solid #e5e5e5;
					color: #e6a84b;
					font-weight: 800;
					background-color: #fff3ef;
					height: 50px;
					line-height: 50px;
				}

				.des {
					border-bottom: 1px solid #e5e5e5;
					padding-left: 20rpx;
					display: flex;
					align-items: center;

					.des_text {
						color: #e6a84b;
						width: 14%;
						font-weight: 800;
						user-select: text;
					}

					.des_deta {
						width: 85%;
						line-height: 26px;
						text-indent: 2em;
						user-select: text;
					}
				}

				.dayun_title {
					color: red;
					font-size: 30rpx;
				}

				.dayunone {
					margin-top: 8px;
					padding: 8px;
				}
			}
		}

	}
</style>